import request from '@/utils/request'

/**
 * 列表
 * @returns
 */
export function GetListAPI (query) {
  return request({
    url: '/system/customer-management/list',
    method: 'GET',
    params: query
  })
}

/**
 * 新增
 * @returns
 */
export function AddDataAPI (data) {
  return request({
    url: '/system/customer-management/add',
    method: 'POST',
    data
  })
}

/**
 * 修改
 * @returns
 */
export function EditDataAPI (data) {
  return request({
    url: '/system/customer-management/update',
    method: 'PUT',
    data
  })
}

/**
 * 查询单条
 * @returns
 */
export function GetViewAPI (data) {
  return request({
    url: '/system/customer-management/view/' + data,
    method: 'GET'
  })
}

/**
 * 删除
 * @returns
 */
export function DelDataAPI (data) {
  return request({
    url: '/system/customer-management/delete/' + data,
    method: 'DELETE'
  })
}

//审核
export function ExamineAPI (data) {
  return request({
    url: '/system/customer-management/customerReview',
    method: 'POST',
    data
  })
}

//归属人下拉
export function userTheAPI (query) {
  return request({
    url: '/system/userSaas/userThe',
    method: 'GET',
    params: query
  })
}

//提交
export function reviewSubmitAPI (data) {
  return request({
    url: '/system/customer-management/reviewSubmit/' + data,
    method: 'GET'
  })
}

//撤销审核
export function revokeAPI (data) {
  return request({
    url: '/system/customer-management/revoke/' + data,
    method: 'GET'
  })
}

//冻结客户
export function frozenAPI (data) {
  return request({
    url: '/system/customer-management/frozen/' + data,
    method: 'GET'
  })
}

//解冻客户
export function thawAPI (data) {
  return request({
    url: '/system/customer-management/thaw/' + data,
    method: 'GET'
  })
}